<%@page import="entity.profit"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试报表</title>
</head>
<body>
<h1>商品信息报表</h1>

<form action="<%=request.getContextPath() %>/src/servlet/profit_servlet" method="post">
	<input type="submit" value="查询报表">
</form>
<p/>

<table border = "1" align = "center">
<tr>
	<th colspan="5"   style="font-size:30px;">报表信息</th>
<tr>	
	<th>序号</th>
	<th>商品名称</th>
	<th>卖出数量</th>
	<th>交易次数</th>
	<th>利润</th>
<tr>

<%
	ArrayList<profit> list = null;
	if(session.getAttribute("profit") != null)
	{
		list = (ArrayList<profit> )session.getAttribute("profit");
	    for(int i=0 ; i<list.size();i++)
	    {
	    	profit pf = list.get(i); 
	    	if(pf == null)
	    	{
	    		continue;
	    	}
%>  	
<tr>
    <td><%= pf.getPf_id()  %></td>	
    <td><%= pf.getGoodsname() %></td>	
    <td><%= pf.getSell_count()  %></td>	
    <td><%= pf.getTrading_times()  %></td>	
    <td><%= pf.getProfits() %></td>
</tr>
<%    	
    	}
	}  
%>
</table>



</body>
</html>